using MediatR;
using B.S.XZYData.ErrorCode;
using System.ComponentModel.DataAnnotations;

namespace B.S.XZYData.Api.Wrter.Application.Command.AssemblyWorkOrder
{
    /// <summary>
    /// 更新产品完成数命令
    /// </summary>
    public class UpdateProductCompletedQuantityCommand : IRequest<ApiResult<bool>>
    {
        /// <summary>
        /// 产品明细ID
        /// </summary>
        [Required(ErrorMessage = "产品明细ID不能为空")]
        public long ProductDetailId { get; set; }

        /// <summary>
        /// 完成数
        /// </summary>
        [Required(ErrorMessage = "完成数不能为空")]
        [Range(0, int.MaxValue, ErrorMessage = "完成数不能小于0")]
        public int CompletedQuantity { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        [Required(ErrorMessage = "修改人不能为空")]
        public string Updator { get; set; } = string.Empty;
    }
} 